<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8">
    <link rel="stylesheet" href="<tmpl_var name=css_path>/dauphin.css" type="text/css">
    <link rel="stylesheet" href="datepicker/fd-datepicker.css" type="text/css">
	<link rel="shortcut icon" href="<tmpl_var name=css_path>/favicon.ico" type="image/vnd.microsoft.icon">
    <link rel="icon" href="<tmpl_var name=css_path>/favicon.ico" type="image/vnd.microsoft.icon">
	<title><tmpl_var name="mode"> - <tmpl_var name="table_name"> - dauphin</title>
	<script src="datepicker/js/fd-datepicker.js"></script>
</head>
<body>
	<tmpl_include name="nav.inc">
	<form method="get" action="">
	<tmpl_if name="id"><input type="hidden" name="id" value="<tmpl_var name=id>"></tmpl_if>
	<input type="hidden" name="string" value="<tmpl_var name=string>">
	<input type="hidden" name="mode" value="save">
	<input type="hidden" name="offset" value="<tmpl_var name=offset>">
    <table id="edit_table" border="1">
		<tr>
			<th colspan="2">
				<div class="table_title">
<tmpl_var name="mode"> - <tmpl_var name="table_name"> - dauphin
</div>
				<div class="switch_modes"><a href="?mode=display&amp;id=<tmpl_var name=id>&amp;offset=<tmpl_var name=offset>"><button>display</button></div>
			</th>
		</tr>
				<tr>
			<td></td>
			<td>
				<input type="submit" value="save">
			</td>
		</tr>
		<tmpl_loop name="internal"><tmpl_unless name="key_field">
		<tr class="<tmpl_if name=__odd__>odd<tmpl_else>even</tmpl_if>" valign="top">
			<td class="name" valign="top">
				<tmpl_var name="field_name"><tmpl_if name="comment"><br><span class="comment">(<tmpl_var name="comment">)</span></tmpl_if>
			</td>
			<td class="field">
			<tmpl_if name="text">
				<input type="text" size="100" name="<tmpl_var name=field_name>"<tmpl_if name="max_length"> maxlength="<tmpl_var name=max_length>"</tmpl_if> value="<tmpl_var name=field_value escape=html>"></tmpl_if>
			<tmpl_if name="date">
				<input type="text" id="dauphin_datefield" class="format-y-m-d divider-dash highlight-days-12 no-fade" size="10" name="<tmpl_var name=field_name>" maxlength="10" value="<tmpl_var name=field_value escape=html>">
				<!--<span>[use "yyyy-mm-dd" format, e.g. "2007-06-01" for June 1 2007]</span>-->
			</tmpl_if>
			<tmpl_if name="textarea">
			<textarea cols="48" rows="6" name="<tmpl_var name=field_name>"><tmpl_var name=field_value escape=html></textarea>
			</tmpl_if>
			<tmpl_if name="select">
			<select name="<tmpl_var name=field_name>" <tmpl_if name="multiple">multiple size="4"</tmpl_if>>
				<tmpl_unless name="multiple"><option value=""> </option></tmpl_unless>
				<tmpl_loop name="options">
				<option value="<tmpl_if name=value><tmpl_var name=value><tmpl_else><tmpl_var name=name></tmpl_if>" <tmpl_var name=selected>>
					<tmpl_var name="name">
				</option>
				</tmpl_loop>
			</select>
			</tmpl_if>
			<tmpl_if name="checkbox">
				<tmpl_loop name="checkboxes">
			<input type="checkbox" name="<tmpl_var name=name>" value="<tmpl_var name=name>">
				</tmpl_loop>
			</tmpl_if>
			<tmpl_if name="radiobutton">
				<tmpl_loop name="radiobutton"><input type="radio" name="<tmpl_var name=name>" value="<tmpl_var name=value>"></tmpl_loop>
			</tmpl_if>
			</td>
		</tr>
</tmpl_unless>
</tmpl_loop>
<tmpl_loop name="external_fields"> 
		<tr class="<tmpl_if name=__odd__>odd<tmpl_else>even</tmpl_if>">
			<td class="name" valign="top">
				<tmpl_var name="field_name">
			</td>
			<td class="field">
			<tmpl_if name="multiple">
				<tmpl_loop name="values"> 				
				<span class="checkbox">
				<input type="checkbox" name="<tmpl_var name=field_name>" value="<tmpl_var name=id>"<tmpl_if name="checked"> checked</tmpl_if>><tmpl_var name=value>
				</span>
				</tmpl_loop>
			<tmpl_else>
			<select name="<tmpl_var name=field_name>">
				<option> </option>
				<tmpl_loop name="values"><option value="<tmpl_var name=id>" <tmpl_if name="checked">selected</tmpl_if>>
					<tmpl_var name=value>
				</option></tmpl_loop>
			</select>
			</tmpl_if>
			</td>
	   </tr>
</tmpl_loop>
		<tr>
			<td></td>
			<td>
				<input type="submit" value="save">
			</td>
		</tr>
	</table>
	</form>
	<tmpl_include name="nav.inc">
</body>
</html>
